<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=3,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>修改订单价格</title>
    <link href="../css/reset-html5.css" rel="stylesheet">
    <link href="../css/wx-main.css?20161028_1" rel="stylesheet">
    <script src="../js/jquery-2.2.1.min.js"></script>
    <script src="../plugins/vue/vue.min.js"></script>
    <link href="../css/mui.min.css" rel="stylesheet">
</head>
<body>

<p class="mar-top">请输入订单价格</p>
<div class="mui-input-row">
    <input id="price" type="tel" class="mui-input-clear contact" placeholder="" data-input-clear="2"><span class="mui-icon mui-icon-clear mui-hidden"></span>
</div>

<p>请输入加价原因</p>
<div class="row mui-input-row">
    <textarea id="reason" class="mui-input-clear question" placeholder=""></textarea>
</div>
<div class="mui-text-center" style="text-align: center">
    <button class="mui-btn mui-btn-green" onclick="history.go(-1)">返回</button><button class="mui-btn mui-btn-blue" id="edit">确认修改</button>
</div>
</body>
<script src="../js/mui.min.js"></script>
<script src="../js/base.js"></script>
<script src="../js/phone.js"></script>
<script>

    $('#edit').click(function(){
        var price = $('#price').val();
        var message = $('#reason').val();
        if(!price){
            alert('请输入修改价格');
            return false;
        }
        if(!message){
            alert('请输入加价原因');
            return false;
        }
        alert_price(price,message);
    });

    /**
     * 完成数据
     * @param price
     * @param message
     */
    function alert_price(price,message){
        $.post('../index/admin.php?m=Home&c=Index&a=changeOrderPrice', {order_id: phone_getQueryString('order_id'),price:price,message:message}, function (res) {
            if (res.code == 200) {
                history.go(-1);
            } else {
                alert(res.message);
            }
        }, 'json');
    }

</script>
</html>